package org.dromara.wmscloud.domain.bo;

import org.dromara.wmscloud.domain.BaseMatBom;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 物料BOM业务对象 base_mat_bom
 *
 * @author hou
 * @date 2025-04-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BaseMatBom.class, reverseConvertGenerate = false)
public class BaseMatBomBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long bomId;

    /**
     * 父物料编码
     */
    @NotBlank(message = "父物料编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fatherMatCode;

    /**
     * 父项数量
     */
    @NotNull(message = "父项数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long fatherMatNum;

    /**
     * 子项行项目号
     */
    private Long childNo;

    /**
     * 子项物料编码
     */
    @NotBlank(message = "子项物料编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String childMatCode;

    /**
     * 子项数量
     */
    @NotNull(message = "子项数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long childMatNum;

    /**
     * 是否虚拟键
     */
    @NotBlank(message = "是否虚拟键不能为空", groups = { AddGroup.class, EditGroup.class })
    private String isFictitious;
}
